package com.lepu.app.fun.my.bean;

import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class BeanMyInfo {

	//public String TotalCredits;//总积分
	public int AvailableCredits;//可用积分
	public String ThreadCount;//帖子数量
	public String FollowCount;//关注数量
	public String FansCount;//粉丝数量
	public String CollectCount;//收藏数量  ======================新加
	public String HasSignIn;//0 未签到， 1 已签到
	
	/*
	 * 解析数据
	 */
	public static BeanMyInfo parseDetailInfo(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONObject obj2 = (JSONObject) obj1.get("DetailInfo");
			
			result = obj2.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		BeanMyInfo item = gson.fromJson(result,
				new TypeToken<BeanMyInfo>() {
				}.getType());
		return item;
	}
	
}
